import random
import time


class Register:
    @classmethod
    # 定义获取手机号码的函数名
    def get_mobile(cls):
        # 确定手机号码所需要格式
        cls.mobiles = ['130', '131', '134', '135']
        # 通过时间戳获取手机号码的后8位数(一定不会重复)
        cls.number = str(int(time.time()))[2:]
        # 把手机号码格式的三位数与后8位数相加
        cls.mobile = random.choice(cls.mobiles) + cls.number
        return cls.mobile

    # 定义获取用户名的函数名
    @classmethod
    def get_username(cls):
        cls.usernames = ['mike', 'wu', 'shao', 'fang']
        cls.number=str(random.randint(1,100)+random.randint(1,100)+random.randint(1,100)+random.randint(1,100))
        cls.username=random.choice(cls.usernames)+cls.number
        return "zdh_" + cls.username

    # 定义获取邮箱的函数名
    @classmethod
    def get_email(cls):
        cls.emails=['@qq.com', '@51test.com', '@live.com', '@163.com']
        cls.number = str(int(time.time()))[4:]
        cls.email=cls.number+random.choice(cls.emails)
        return cls.email

    # 定义获取真实姓名的函数名--（规则：2-4位中文)
    @classmethod
    def get_true_name(cls):
        cls.true_names = ['五姨夫', '吴一帆', '吴一凡', '吴亦凡']
        cls.true_name=random.choice(cls.true_names)
        return cls.true_name


if __name__ == '__main__':
    obj=Register()
    obj.get_username()